package com.kaigejava.guanchazhemoshi.oo;

import lombok.Data;

/**
 * Created by kaigejava on 2019/8/11.
 * 公告板 面向对象
 */
@Data
public class CurrentCoditionOO {
    /**
     * 温度
     */
    private float temperatrue;

    /**
     * 气压
     */
    private float pressure;

    /**
     * 湿度
     */
    private float humidity;

    /**
     * 更新天气的
     */
    public void update(float temperatrue,float pressure,float humidity){
        this.temperatrue = temperatrue;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    /**
     * 对外展示天气信息
     */
    public void display(){
        System.out.println("****今天天气信息******");
        System.out.println("****温度："+temperatrue);
        System.out.println("****气压："+pressure);
        System.out.println("****湿度："+humidity);
    }
}
